touchBox = newBox(33, 97, 78, 142)
heldBox = newBox(79, 97, 124, 142)
doubleclickBox = newBox(125, 97, 170, 142)
x = 0
y = 0
while not Keys.newPress.Start do

Controls.read ()

if Stylus.held then
x = Stylus.X
y = Stylus.Y
end

startDrawing()
screen.drawRect(SCREEN_DOWN, 33, 97, 78, 142, Color.new(31, 31, 31))
screen.drawRect(SCREEN_DOWN, 79, 97, 124, 142, Color.new(31, 31, 31))
screen.drawRect(SCREEN_DOWN, 125, 97, 170, 142, Color.new(31, 31, 31))
if Stylus.newPressinBox(touchBox, x, y) then
screen.print(SCREEN_UP, 50, 50, "New Press !!!")
end
if Stylus.heldinBox(heldBox, x, y) then
screen.print(SCREEN_UP, 50, 50, "Helding !!!")
end
if Stylus.doubleClickinBox(doubleclickBox, x, y) then
screen.print(SCREEN_UP, 50, 50, "Double Clicked !!!")
end
stopDrawing()
end
x = nil
y = nil
touchBox = nil
heldBox = nil
doubleclickBox = nil
